package com.ruibang.glass.common.domain.file;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.ruibang.glass.common.constants.Constants;
import com.teaming.cloud.framework2.common.pojo.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * <p>
 * 文件夹信息
 * </p>
 *
 * @author songJinKang
 * @since 2024-04-15
 */


@Data
@ApiModel(value = "文件夹信息")
public class FolderInfo extends BaseEntity {
    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;
    @ApiModelProperty(value = "文件名称")
    @NotBlank(message = "文件名称不可为空")
    private String fileName;
    @ApiModelProperty(value = "文件id")
    @NotBlank(message = "文件ID不可为空")
    private String fileId;
    @ApiModelProperty(value = "是否是文件夹1：是  0：否")
    private String isDir;
    @ApiModelProperty(value = "路径")
    @Pattern(regexp = Constants.UNIX_PATH_REGEX, message = "请传入一个正确的文件路径")
    private String path;
    @ApiModelProperty(value = "业务ID")
    @NotBlank(message = "业务ID不可为空")
    private String businessId;
    @ApiModelProperty(value = "是否删除(1：是 0：否)")
    @TableLogic
    private String isDelete;
    @ApiModelProperty(value = "文件地址")
    @TableField(exist = false)
    private String fileAddress;
    @ApiModelProperty(value = "文件大小")
    @TableField(exist = false)
    private Long fileSize;
    @ApiModelProperty(value = "目标路径")
    @NotBlank(message = "目标路径不可为空")
    @TableField(exist = false)
    private String targetPath;
}

